//
//  TestViewController.m
//  MyMicroBlog
//
//  Created by Apple on 16/9/22.
//  Copyright © 2016年 Apple. All rights reserved.
//

#import "TestViewController.h"
#import "UIBarButtonItem+Extension.h"
@interface TestViewController ()

@end

@implementation TestViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor brownColor];
    [self addNaviRightButton];
}

-(void)addNaviRightButton{
    self.navigationItem.rightBarButtonItem = [UIBarButtonItem itemWithTitle:@"push" andImageName:nil andTarget:self andAction:@selector(pushAction)];
}

//点击事件
-(void)pushAction{
    TestViewController *testVC = [[TestViewController alloc]init];
    [self.navigationController pushViewController:testVC animated:YES];
}
@end
